---
layout: example
category: example
title: View a fullscreen map
description: Toggle between current view and fullscreen mode
tags:
  - controls-and-overlays
---

<div id='map'></div>

<script>

var map = new mapboxgl.Map({
    container: 'map', // container id
    style: 'mapbox://styles/mapbox/outdoors-v9', //stylesheet location
    center: [11.255, 43.77], // starting position
    zoom: 13 // starting zoom
});

map.addControl(new mapboxgl.FullscreenControl());

</script>
